package view;

import java.awt.Container;
import java.awt.Label;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class MainWindow extends javax.swing.JFrame {

	private JMenuItem createReservationMenuItem;
	private JMenuItem createBillMenuItem;
	private JMenuItem cancelReservationMenuItem;
	private JMenuItem listReservationsMenuItem;
	
	private JMenu jMenu6;


	private JMenuItem createCustomerMenuItem;
	private JMenuItem editCustomerMenuItem;
	private JMenu jMenu5;
	private JMenuItem editRoomsMenuItem;
	private JMenuItem createRoomMenuItem;
	private JMenu jMenu4;
	private JMenuItem exitMenuItem;
	private JMenu jMenu3;
	private JMenuBar jMenuBar1;


	
	public MainWindow() {
		super();
		initGUI();
	}
	
	public JFrame getFrame(){
		return this;
	}
	
	private void initGUI() {
		try {
			this.setSize(719, 617);
			this.setTitle("Welcome to Hypnosium - the reservation management tool ");
			this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			Container content = this.getContentPane();
			//content.add(new Label("Hello"));
			{
				jMenuBar1 = new JMenuBar();
				setJMenuBar(jMenuBar1);
				{
					jMenu3 = new JMenu();
					jMenuBar1.add(jMenu3);
					jMenu3.setText("Hypnosium");
					{
						exitMenuItem = new JMenuItem();
						jMenu3.add(exitMenuItem);
						exitMenuItem.setText("Exit");
						
					}
				}
				{
					jMenu4 = new JMenu();
					jMenuBar1.add(jMenu4);
					jMenu4.setText("Room");
					
					{
						createRoomMenuItem = new JMenuItem();
						jMenu4.add(createRoomMenuItem);
						createRoomMenuItem.setText("Create Room");
					}
					{
						editRoomsMenuItem = new JMenuItem();
						jMenu4.add(getEditRoomsMenuItem());
						editRoomsMenuItem.setText("Edit Rooms");
					}
				}
				{
					jMenu5 = new JMenu();
					jMenuBar1.add(jMenu5);
					jMenu5.setText("Customer");
					{
						createCustomerMenuItem = new JMenuItem();
						jMenu5.add(createCustomerMenuItem);
						createCustomerMenuItem.setText("Create Customer");
					}
					{
						editCustomerMenuItem = new JMenuItem();
						jMenu5.add(editCustomerMenuItem);
						editCustomerMenuItem.setText("Edit Customer");
					}
					
				}
				{
					jMenu6 = new JMenu();
					jMenuBar1.add(jMenu6);
					jMenu6.setText("Reservation");
					{
						createReservationMenuItem = new JMenuItem();
						jMenu6.add(createReservationMenuItem);
						createReservationMenuItem.setText("Create Reservation");
					}
					{
						createBillMenuItem = new JMenuItem();
						jMenu6.add(createBillMenuItem );
						createBillMenuItem .setText("Create Bill for Reservation");
					}
//					{
//						cancelReservationMenuItem = new JMenuItem();
//						jMenu6.add(cancelReservationMenuItem);
//						cancelReservationMenuItem.setText("Cancel Reservation");
//					}
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public void addActionsListeners(ActionListener a1){
		exitMenuItem.addActionListener(a1);
		editCustomerMenuItem.addActionListener(a1);
		createCustomerMenuItem.addActionListener(a1);
		createRoomMenuItem.addActionListener(a1);
		editRoomsMenuItem.addActionListener(a1);
		createReservationMenuItem.addActionListener(a1);
		createBillMenuItem.addActionListener(a1);
		//cancelReservationMenuItem.addActionListener(a1);
	}

	public JMenuItem getCreateBillMenuItem() {
		return createBillMenuItem;
	}

	public JMenuItem getCreateCustomerMenuItem()
	{
		return createCustomerMenuItem;
	}
	
	public void setCreateCustomerMenuItem(JMenuItem createCustomerMenuItem)
	{
		this.createCustomerMenuItem = createCustomerMenuItem;
	}

	public JMenuItem getEditCustomerMenuItem()
	{
		return editCustomerMenuItem;
	}

	public void setEditCustomerMenuItem(JMenuItem editCustomerMenuItem)
	{
		this.editCustomerMenuItem = editCustomerMenuItem;
	}

	public JMenuItem getCreateRoomMenuItem()
	{
		return createRoomMenuItem;
	}

	public void setCreateRoomMenuItem(JMenuItem modifyCustomerMenuItem)
	{
		this.createRoomMenuItem = modifyCustomerMenuItem;
	}

	public JMenuItem getCreateReservationMenuItem() {
		return createReservationMenuItem;
	}

	public void setCreateReservationMenuItem(JMenuItem createReservationMenuItem) {
		this.createReservationMenuItem = createReservationMenuItem;
	}

	public JMenuItem getExitMenuItem()
	{
		return exitMenuItem;
	}

	public void setExitMenuItem(JMenuItem exitMenuItem)
	{
		this.exitMenuItem = exitMenuItem;
	}
	
	public JMenuItem getEditRoomsMenuItem() {
		return editRoomsMenuItem;
	}
}
